Optimal. Leaf size=67 \[ \frac{c (b c-2 a d)}{a^2 x}+\frac{\log (x) (b c-a d)^2}{a^3}-\frac{(b c-a d)^2 \log (a+b x)}{a^3}-\frac{c^2}{2 a x^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0505042, antiderivative size = 67, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.056, Rules used = {88} \[ \frac{c (b c-2 a d)}{a^2 x}+\frac{\log (x) (b c-a d)^2}{a^3}-\frac{(b c-a d)^2 \log (a+b x)}{a^3}-\frac{c^2}{2 a x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 88
Rubi steps
\begin{align*} \int \frac{(c+d x)^2}{x^3 (a+b x)} \, dx &=\int \left (\frac{c^2}{a x^3}+\frac{c (-b c+2 a d)}{a^2 x^2}+\frac{(-b c+a d)^2}{a^3 x}-\frac{b (-b c+a d)^2}{a^3 (a+b x)}\right ) \, dx\\ &=-\frac{c^2}{2 a x^2}+\frac{c (b c-2 a d)}{a^2 x}+\frac{(b c-a d)^2 \log (x)}{a^3}-\frac{(b c-a d)^2 \log (a+b x)}{a^3}\\ \end{align*}
Mathematica [A] time = 0.0526087, size = 60, normalized size = 0.9 \[ -\frac{\frac{a c (a c+4 a d x-2 b c x)}{x^2}-2 \log (x) (b c-a d)^2+2 (b c-a d)^2 \log (a+b x)}{2 a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 110, normalized size = 1.6 \begin{align*} -{\frac{{c}^{2}}{2\,a{x}^{2}}}+{\frac{\ln \left ( x \right ){d}^{2}}{a}}-2\,{\frac{b\ln \left ( x \right ) cd}{{a}^{2}}}+{\frac{\ln \left ( x \right ){b}^{2}{c}^{2}}{{a}^{3}}}-2\,{\frac{cd}{ax}}+{\frac{{c}^{2}b}{{a}^{2}x}}-{\frac{\ln \left ( bx+a \right ){d}^{2}}{a}}+2\,{\frac{\ln \left ( bx+a \right ) bcd}{{a}^{2}}}-{\frac{\ln \left ( bx+a \right ){b}^{2}{c}^{2}}{{a}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.05051, size = 119, normalized size = 1.78 \begin{align*} -\frac{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (b x + a\right )}{a^{3}} + \frac{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (x\right )}{a^{3}} - \frac{a c^{2} - 2 \,{\left (b c^{2} - 2 \, a c d\right )} x}{2 \, a^{2} x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.24603, size = 208, normalized size = 3.1 \begin{align*} -\frac{a^{2} c^{2} + 2 \,{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x^{2} \log \left (b x + a\right ) - 2 \,{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x^{2} \log \left (x\right ) - 2 \,{\left (a b c^{2} - 2 \, a^{2} c d\right )} x}{2 \, a^{3} x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.973504, size = 187, normalized size = 2.79 \begin{align*} - \frac{a c^{2} + x \left (4 a c d - 2 b c^{2}\right )}{2 a^{2} x^{2}} + \frac{\left (a d - b c\right )^{2} \log{\left (x + \frac{a^{3} d^{2} - 2 a^{2} b c d + a b^{2} c^{2} - a \left (a d - b c\right )^{2}}{2 a^{2} b d^{2} - 4 a b^{2} c d + 2 b^{3} c^{2}} \right )}}{a^{3}} - \frac{\left (a d - b c\right )^{2} \log{\left (x + \frac{a^{3} d^{2} - 2 a^{2} b c d + a b^{2} c^{2} + a \left (a d - b c\right )^{2}}{2 a^{2} b d^{2} - 4 a b^{2} c d + 2 b^{3} c^{2}} \right )}}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20935, size = 136, normalized size = 2.03 \begin{align*} \frac{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left ({\left | x \right |}\right )}{a^{3}} - \frac{{\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{a^{3} b} - \frac{a^{2} c^{2} - 2 \,{\left (a b c^{2} - 2 \, a^{2} c d\right )} x}{2 \, a^{3} x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]